<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" language="JavaScript">
  <xsl:template match="tree">
    <select id="ddlRptGroup" style="width:100%">
      <xsl:apply-templates select="treeitem" />
    </select>
  </xsl:template>
  <xsl:template match="treeitem">
    <xsl:if expr="depth(this) &gt; 2">
      <xsl:element name="option">
        <xsl:attribute name="value">
          <xsl:value-of select="@grpguid" />
        </xsl:attribute>
        <xsl:attribute name="grpid">
          <xsl:value-of select="@grpid" />
        </xsl:attribute>
        <xsl:choose>
          <xsl:when expr="depth(this) == 4">??</xsl:when>
          <xsl:when expr="depth(this) == 5">????</xsl:when>
        </xsl:choose>
        <xsl:value-of select="@grpcname" />
      </xsl:element>
    </xsl:if>
    <xsl:apply-templates select="./treeitem" />
  </xsl:template>
</xsl:stylesheet>